package scau.erps.app;

import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.UIManager;

import scau.erps.view.LoginDialog;


/**
 * 主程序入口
 * @author DCJ
 *
 */
public class App {	
	public static void main(String[] args) {		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					setUIFont();				
					org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF(); //外观
				} catch (Exception e) {
					e.printStackTrace();
				}
				new LoginDialog();

				 
			}
		});
	}
	
	/**
	 * 设置Swing全局字体
	 * @author DCJ
	 * 
	 */
	public static void setUIFont()
	{
		Font f = new Font("微软雅黑",Font.PLAIN,14);
		String   names[]={ "Label", "CheckBox", "PopupMenu","MenuItem", "CheckBoxMenuItem",
				"JRadioButtonMenuItem","ComboBox", "Button", "Tree", "ScrollPane",
				"TabbedPane", "EditorPane", "TitledBorder", "Menu", "TextArea",
				"OptionPane", "MenuBar", "ToolBar", "ToggleButton", "ToolTip",
				"ProgressBar", "TableHeader", "Panel", "List", "ColorChooser",
				"PasswordField","TextField", "Table", "Label", "Viewport",
				"RadioButtonMenuItem","RadioButton", "DesktopPane", "InternalFrame"
		}; 
		for (String item : names) {
			 UIManager.put(item+ ".font",f); 
		}
		UIManager.put("RootPane.setupButtonVisible",false);
	}
}
